//
//  DDLoginManager.h
//  Dingdong
//
//  Created by 程强 on 16/11/17.
//  Copyright © 2016年 程强. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "DSASubject.h"

@interface DDLoginManager : NSObject

/**
 登录接口

 @param userName 用户名
 @param pwd 密码
 @return subject
 */
- (DSASubject *)loginIn:(NSString *)userName password:(NSString *)pwd;

/**
 注册

 @param email 邮箱
 @param pwd 密码
 @param gender 性别
 @param name 用户名
 @return subject
 */
- (DSASubject *)registerUser:(NSString *)email password:(NSString *)pwd gender:(NSString *)gender name:(NSString *)name;

/**
 登出

 @param token token
 @return subject
 */
- (DSASubject *)logout:(NSString *)token;

/**
 发送邮件 找回密码验证码

 @param email email
 @return subject
 */
- (DSASubject *)retrievePasswordVerifyCode:(NSString *)email;

/**
 重置密码

 @param email 邮箱
 @param code 验证码
 @param password 密码
 @param cpwd 密码
 @return subject
 */
- (DSASubject *)retrievePassword:(NSString *)email code:(NSString *)code pwd:(NSString *)password confirmPwd:(NSString *)cpwd;

/**
 获取用户信息
 
 @return subject
 */
- (DSASubject *)getUserInfo;
@end
